﻿<div ng-controller="Inventory">

    <h1 class="page-header">Inventory</h1>

    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th>Date</th>
                <th>Type</th>
                <th>Branch &amp; Build</th>
                <th>Container</th>
                <th>Expires</th>
                <th>Release</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td ng-show="!items.length" colspan="6">
                    No data.
                </td>
            </tr>
            <tr ng-show="items.length" ng-repeat="item in items">
                <td>{{item.date}}</td>
                <td>{{item.type}}</td>
                <td>{{item.branch}} {{item.build}}</td>
                <td><a href="{{item.container.server}}" target="_blank">{{item.container.server}}</a><br/>{{item.container.client}}</td>
                <td>{{item.expires}}</td>
                <td>
                    <button class="btn btn-danger" ng-click="release(item.id)">
                        <span class="glyphicon glyphicon-remove"></span> Release
                    </button>
                </td>
            </tr>
        </tbody>
    </table>
</div>
